GBML manual / Backgrounds

perspective_floor_horizon

Sets the screen row where the perspective floor starts, counted down from the top of the screen. Rows above it show the room’s other pictures. It starts a third of the way down.

Game Boy: not available

Game Boy Color: not available

Sega Genesis: not built yet - The Sega Genesis will draw the road its own way.

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

perspective_floor_horizon(row)

Arguments

NameType
rowint

Returns

Nothing.

Description

Sets the screen row where the perspective floor starts, counted down from the top of the screen: 0 is the top row, and a row as big as the screen is tall puts the floor out of sight. It starts a third of the way down. It does nothing in a room that has no zoomable background.

Rows above it show the room's other pictures, so this is where a skyline goes. Right under the horizon the floor is the farthest part of the picture, drawn in very thin rows, and a row or two there may show nothing when the camera is high: the distance is too great to draw.

Example

perspective_floor_horizon(54);

The sky takes the top 54 rows of the screen and the road takes the rest.

On the GBA

A no-op in a room that has no zoomable background. 0 is the top row; the screen’s height puts the floor out of sight. Put the skyline of the room’s own picture above this row. The floor right under the horizon is the farthest part of the picture, and it is drawn in very thin rows: a row or two below the horizon may show nothing when the camera is high, because the distance there is too great to draw.

See also: Perspective floorperspective_floorperspective_floor_heightperspective_floor_view